package cn.hd01.common;

import java.util.ArrayList;
import java.util.List;

import cn.hd01.model.BackendTypeModel;


public class BaseConstant {
	
	public static class ruleCode{
		public static final String SIGN_INTEGRATION = "SIGN_INTEGRATION";
		
		public static final String CONSUME_INTEGRATION = "CONSUME_INTEGRATION";
		
		public static final String RECOMM_CONSUME_INTEGRATION = "RECOMM_CONSUME_INTEGRATION";
		
		public static final String PROMOTE_INTEGRATION = "PROMOTE_INTEGRATION";
	}
	
	public static class RoleId{
		public static final Integer ADMIN_ROLE_ID = 1;
		
		public static final Integer TEACHER_ROLE_ID = 2;
	}
	
	public static class AuditStatus {
		
		public static final String AUDIT_WAIT = "0";
		
		public static final String AUDIT_WAIT_TEXT = "等待审核";
		
		public static final String AUDIT_PASS = "1";
		
		public static final String AUDIT_PASS_TEXT = "审核通过";
		
		public static final String AUDIT_REJECT = "2";
		
		public static final String AUDIT_REJECT_TEXT = "审核不通过";
		
		public static final String AUDIT_NONE = "3";
		
		public static final String AUDIT_NONE_TEXT = "无需审核";
		
		public static String getText(String index){
			if(AUDIT_WAIT.equals(index)){
				return AUDIT_WAIT_TEXT;
			}
			
			if(AUDIT_PASS.equals(index)){
				return AUDIT_PASS_TEXT;
			}
			
			if(AUDIT_REJECT.equals(index)){
				return AUDIT_REJECT_TEXT;
			}
			
			if(AUDIT_NONE.equals(index)){
				return AUDIT_NONE_TEXT;
			}
			return "";
		}
		
	}


	public static class Status {
		
		public static final String VALID = "0";
		
		public static final String INVALID = "1";
		
		public static final List<String> statusList = new ArrayList<String>(2);
		
	}
	
	public class CustomerType {
		
		public static final String CUSTOMER = "0";
		
		public static final String DISTRIBUTOR = "1";
		
	}
	
	public class ServantType {
		
		public static final String TEACHER = "0";
		
		public static final String STAFF = "1";
		
	}
	
	public static class IsBalance {
		public static final String BALANCE_DOWN = "0";
		
		public static final String BALANCE_DOWN_TEXT = "已结算";
		
		public static final String BALANCE_WAIT = "1";
		
		public static final String BALANCE_WAIT_TEXT = "未结算";
		
		public static String getText(String index){
			if(BALANCE_DOWN.equals(index)){
				return BALANCE_DOWN_TEXT;
			}else if(BALANCE_WAIT.equals(index)){
				return BALANCE_WAIT_TEXT;
			}else {
				return "未知";
			}
		}
	}
	
	public class RebateSummaryType{
		public static final String DISTRIBUTOR = "0";
		
		public static final String SERVANT_TEACHER = "1";
	}
	
	public class WithdrawStatus{
		
		public static final String SUCCESS_TEXT = "已提现";
		
		public static final String SUCCESS = "0";
		
		public static final String NOT_TEXT = "待提现";
		
		public static final String NOT = "1";

	}
	
	public static class backendType {
		public static final Integer ADMIN = 0;
		
		public static final String ADMIN_TEXT = "管理人员";
		
		public static final Integer TEACHER = 1;
		
		public static final String TEACHER_TEXT = "服务老师";
		
		private static List<BackendTypeModel> typeList = new ArrayList<BackendTypeModel>(2);
		
		static {
			typeList.add(new BackendTypeModel(ADMIN_TEXT, ADMIN));
			typeList.add(new BackendTypeModel(TEACHER_TEXT, TEACHER));
		} 
		
		public static List<BackendTypeModel> getTypeList(){
			return typeList;
		}
		
	}
}
